package com.hoshiibuy.customerOperation.entity.param;

import java.io.Serializable;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hoshiibuy.common.query.CommonParam;
import com.hoshiibuy.customerOperation.entity.GoodsCollectRecord;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 查询用户商品收藏记录参数
 * </p>
 * 
 * @author Mr.Wu
 * @since 2019-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "查询用户商品收藏记录", description = "查询用户商品收藏记录")
public class GoodsCollectRecordQueryParam extends CommonParam implements Serializable {

	private static final long serialVersionUID = 1L;

	private Long id;

	@ApiModelProperty(value = "用户主键")
	private Long userId;

	@ApiModelProperty(value = "渠道  1-PC 2-APP,3-微信小程序 4-微信公众号 5-线下门店")
	private Long channel;

	@ApiModelProperty(value = "门店ID")
	private Long storeId;

	@ApiModelProperty(value = "商品spuid")
	private Long spuId;

	@ApiModelProperty(value = "商品skuid")
	private Long skuId;

	@ApiModelProperty(value = "是否已经标志删除")
	private Integer deleted;

	public QueryWrapper<GoodsCollectRecord> getQueryWrapper() {
		QueryWrapper<GoodsCollectRecord> queryWrapper = new QueryWrapper<GoodsCollectRecord>();
		queryWrapper.eq(this.id != null, "id", this.id);
		queryWrapper.eq(this.userId != null, "user_id", this.userId);
		queryWrapper.eq(this.channel != null, "channel", this.channel);
		queryWrapper.eq(this.storeId != null, "store_id", this.storeId);
		queryWrapper.eq(this.spuId != null, "spu_id", this.spuId);
		queryWrapper.eq(this.skuId != null, "sku_id", this.skuId);
		queryWrapper.eq(this.deleted != null, "deleted", this.deleted);
		return queryWrapper;
	}
}
